package com.chenxi.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;

@Controller
@RequestMapping("/index")
public class IndexController {

	@RequestMapping("/home")
	public ModelAndView handle01(HttpServletRequest request, HttpServletResponse response) {
		Date date = new Date();
		ModelAndView modelAndView = new ModelAndView();
		modelAndView.addObject("date", date);
		modelAndView.setViewName("success");
		return modelAndView;
	}
}

